#include "StdAfx.h"
#include "LayoutObject.h"


LayoutObject::LayoutObject(void) : orientation_(0), position_(0, 0)
{
}


LayoutObject::~LayoutObject(void)
{
}

void LayoutObject::SerializeTo(QDataStream& ds) const
{
	ds << name_ << prefabGuid_ <<
		orientation_ << position_.x() << position_.y();
}

void LayoutObject::DeserializeFrom(QDataStream& ds)
{
	ds >> name_ >> prefabGuid_ >>orientation_;
	float x; float y;
	ds >> x >> y;
	position_.setX(x); position_.setY(y);
}
